<?php
	error_reporting(E_ALL^E_NOTICE^E_WARNING);
	 if(function_exists('date_default_timezone_set')){
		date_default_timezone_set("PRC");
	 }
global $ismysqli;
global $con;
$ismysqli = true;
$mysql_adder = "localhost";
$mysql_user = "hwbl";
$mysql_pass = "facai666.";
$mysql_biao = "hwbl";

if($ismysqli == true)
{
	$con=mysqli_init();
	mysqli_real_connect($con,$mysql_adder,$mysql_user,$mysql_pass,$mysql_biao,3306,NULL,0);
	mysqli_query($con,"SET NAMES UTF8");
}
else
{
	$con = mysql_connect($mysql_adder,$mysql_user,$mysql_pass);
	if (!$con){die('Could not connect: ' . mysql_error());}
	mysql_select_db($mysql_biao, $con);
	mysql_query("SET NAMES UTF8");
}

function pdd_num_rows($result){
	global $ismysqli;
	global $con;
	if($ismysqli == true)
	{
		$fun = mysqli_num_rows($result);
	}
	else{
		$fun = mysql_num_rows($result);
	}
	return $fun;
}

function pdd_affected_rows(){
	global $ismysqli;
	global $con;
	if($ismysqli == true)
	{
		$fun = mysqli_affected_rows($con);
	}
	else{
		$fun = mysql_affected_rows($con);
	}
	return $fun;
}

function pdd_multi_query($sql){
	global $ismysqli;
	global $con;
	return $con->multi_query($sql);
}

function pdd_query($sql)
{
	global $ismysqli;
	global $con;
	if($ismysqli == true)
	{
		$fun = mysqli_query($con,$sql);

	}
	else{
		$fun = mysql_query($sql);
	}
	return $fun;
}
function pdd_insert_id()
{
	global $ismysqli;
	global $con;
	if($ismysqli == true)
	{
		$fun = mysqli_insert_id($con);
	}
	else{
		$fun = mysql_insert_id();
	}
	return $fun;
}
function pdd_fetch_array($result)
{
	global $ismysqli;
	global $con;
	if($ismysqli == true)
	{
		$fun = mysqli_fetch_array($result);
	}
	else{
		$fun = mysql_fetch_array($result);
	}
	return $fun;
}

function pdd_fetch_assoc($result){
	global $ismysqli;
	global $con;
	if($ismysqli == true)
	{
		$fun = mysqli_fetch_assoc($result);
	}
	else{
		$fun = mysql_fetch_assoc($result);
	}
	return $fun;
}


?>